Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Select values (Column with select fields) #149

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

Yo1L
Copy link
Contributor

@Yo1L Yo1L commented Dec 12, 2022

Simple solution to select the right value for select and tick the column header if all values matched :)
It should fix the issue #141

Simple solution to select the right value for select and tick the column header if all values matched :)
@ryanoillataguerre
Copy link

@masiulis anything actionable here? Really want to get this merged, happy to create a new fix if you don't think this will address #141

@masiulis
Copy link
Contributor

masiulis commented Oct 18, 2023

Hey @ryanoillataguerre @Yo1L @h-bragg, sorry guys, I got a bit delayed with work stuff. I need to investigate this topic more, because the code here works in some cases (probably the most common ones) but it works differently from how columns are matched. This PR checks if labels match exactly, while columns match nearby values too with levenshtein distance. On the other hand, adding levenshtein logic here could make column matching exponentially slower.

I will try to implement what I suggested in this comment. If it's too slow I might add this PR as the default and allow enabling levenshtein as an optional flag.

EDIT: decided to implement simple check if imported value matches value / label of any field options. No levenshtein distance for now as it would be too slow on large data sets.

@masiulis masiulis changed the base branch from master to UGN-413 November 6, 2023 14:09
@masiulis masiulis merged commit 8eacb23 into UgnisSoftware:UGN-413 Nov 6, 2023
1 of 3 checks passed
@masiulis
Copy link
Contributor

masiulis commented Nov 9, 2023

Released in 4.4.0 - you will need to set autoMapSelectValues={true} - this flag will be set to true by default in the next major release, but I wanted to release it as a non-breaking change.

@anthonycamut
Copy link

thank you @masiulis it works like a charm! Great job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants